﻿/* 2014/8/3 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace PictureManager.Option
{
    [XmlRoot(ElementName = "ColumnDefinition")]
    [XmlType(TypeName = "ColumnDefinition")]
    public class DynamicColumnDefinitionInfo
    {
        public DynamicColumnDefinitionInfo()
        {

        }

        /*public DynamicColumnDefinitionInfo(string escapeString)
        {
            string[] values = escapeString.Split(separators, StringSplitOptions.None);
            if (values.Length == 4)
            {
                Name = values[0];
                Header = values[1];
                try
                {
                    Width = Int32.Parse(values[2]);
                    Enabled = Boolean.Parse(values[3]);
                }
                catch (Exception ex)
                {
                    throw new ArgumentException("It is not a valid escape string.", "escapeString", ex);
                }
            }
            else
            {
                throw new ArgumentException("It is not a valid escape string.", "escapeString");
            }
        }

        public string EscapeString
        {
            get
            {
                return String.Join(ColumnDefinitionSeparator,
                    new string[] { Name, Header, Width.ToString(), Enabled.ToString() });
            }
        }*/

        public string Name
        {
            get;
            set;
        }

        public string Header
        {
            get;
            set;
        }

        public int Width
        {
            get;
            set;
        }

        public bool Enabled
        {
            get;
            set;
        }
    }
}
